package nbpt.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import nbpt.dao.UrlDao;
import nbpt.entity.UrlInfo;

@Repository
public class UrlDaoImpl extends BaseDaoImpl implements UrlDao {
	
	public UrlInfo findLinkById(Integer tid) {
		return this.getSqlSession().selectOne("findLinkById",tid);
	}

	public List<UrlInfo> findAll() {
		return this.getSqlSession().selectList("findAll");
	}

	public void add(UrlInfo urlInfo) {
		this.getSqlSession().update("add", urlInfo);
	}

	public void delete(Integer tid) {
		this.getSqlSession().selectOne("delete",tid);
	}
	
	public void update(UrlInfo urlInfo) {
		this.getSqlSession().update("update", urlInfo);
	}

	public Long getCount() {
		// TODO Auto-generated method stub
		return null;
	}

	public List<UrlInfo> getQuery(UrlInfo urlInfo) {
		return this.getSqlSession().selectList("getQuery",urlInfo);
	}

}
